﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Text;

namespace AuthenticationAndAuthorization
{
    public partial class Home : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string[] roles = Roles.GetRolesForUser(Membership.GetUser().UserName);
            
            StringBuilder r = new StringBuilder();
            r.Append("Your roles are: ");
            foreach (var role in roles)
            {
                r.Append(role + " ");
            }

            this.loginLbl.Text = r.ToString();
        }
    }
}